<?php
if (!defined("_INDEX")) { header("Location: /"); die; }

require_once ADMIN.DS."head.php";
?>
<script type="text/javascript" src="/files/js/flot/jquery.flot.min.js"></script>

<div class="full">
	<div class='submenu_container'>
		<a class="submenu_button" href="/admin/statistics/coordinators">Координаторы</a>
		<a class="submenu_button submenu_button_active" href="/admin/statistics/graphs">Графики</a>
	</div>
	
	<h3>Графики</h3>
	
	<div class="text-container">
		<div id="time">
			<h4>Период</h4>
			<a class="period submenu_button" href="javascript:void(0)" id='byDay'>
				<span class="dayButton" id="dayPrev"><</span>
				За день <input type="text" class="date rBorder" id="day" />
				<span class="dayButton" id="dayNext">></span>
			</a>
			<a class="period submenu_button" href="javascript:void(0)" id='byWeek'>За неделю</a>
			<a class="period submenu_button" href="javascript:void(0)" id='byMonth'>За месяц</a>
			<a class="period submenu_button" href="javascript:void(0)" id='byPeriod'>От <input type="text" class="date rBorder" id="date1" /> до <input type="text" class="date rBorder" id="date2" /></a>
		</div>
		<div id='graph'>
			<div id="placeholder" style="width:950px;height:300px"></div>
		</div>
		<div id="filters">
			<div id="leftfilters" class="left">
				<div class="filtersheader">
					<div class="filtersheadershadow"></div>
					<div id="leftfilterstitle">Линия 1</div>
					<div class="sexybuttons">
						<a class="sexOne sexy_button sexy_button_active" href="javascript:void(0)" id='oneall'>Все</a>
						<a class="sexOne sexy_button" href="javascript:void(0)" id='onemale'>Мужчины</a>
						<a class="sexOne sexy_button" href="javascript:void(0)" id='onefemale'>Женщины</a>
					</div>
				</div>
				<div class="filterscontainer">
					<div class="filterslabel">
						Возраст
					</div>
					<div class="filterscontent">
						<span>
							<input type="checkbox" class="aone" id="aone16-18" checked="checked" />
							<label for="aone16-18">16-18</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone19-23" checked="checked" />
							<label for="aone19-23">19-23</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone24-29" checked="checked" />
							<label for="aone24-29">24-29</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone30-35" checked="checked" />
							<label for="aone30-35">30-35</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone36-41" checked="checked" />
							<label for="aone36-41">36-41</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone42-49" checked="checked" />
							<label for="aone42-49">42-49</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone50-60" checked="checked" />
							<label for="aone50-60">50-60</label>
						</span>
						<span>
							<input type="checkbox" class="aone" id="aone60-100" checked="checked" />
							<label for="aone60-100">от 60</label>
						</span>
					</div>
					<div class="filterslabel">Город</div>
					<div class="filterscontent">
						<select type="text" id="cityOne">
							<?php
							$oren = $db->getCell("select `city_id` from `cities` where `name` like 'Оренбург' limit 1");
							$not_in_ob = $db->getCell("select `city_id` from `cities` where `name` like 'Не в Оренбургской области' limit 1");
							$cities = $db->getTable("select * from `cities` where `city_id` != '$oren' and `city_id` != '$not_in_ob' order by `name`");
							echo "<option value='0'>Любой</option>";
							echo "<option value='$oren'>Оренбург</option>";
							foreach($cities as $city)
								echo "<option value='$city[city_id]'>$city[name]</option>";
							echo "<option value='$not_in_ob'>Не в Оренбургской обл.</option>";
							?>
						</select>
					</div>
				</div>
			</div>
			<div id="rightfilters" class="right">
				<div class="filtersheader">
					<div class="filtersheadershadow"></div>
					<div id="rightfilterstitle">Линия 2</div>
					<div class="sexybuttons">
						<a class="sexTwo sexy_button sexy_button_active" href="javascript:void(0)" id='twoall'>Все</a>
						<a class="sexTwo sexy_button" href="javascript:void(0)" id='twomale'>Мужчины</a>
						<a class="sexTwo sexy_button" href="javascript:void(0)" id='twofemale'>Женщины</a>
					</div>
				</div>
				<div class="filterscontainer">
					<div class="filterslabel">
						Возраст
					</div>
					<div class="filterscontent">
						<span>
							<input type="checkbox" class="atwo" id="atwo16-18" checked="checked" />
							<label for="atwo16-18">16-18</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo19-23" checked="checked" />
							<label for="atwo19-23">19-23</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo24-29" checked="checked" />
							<label for="atwo24-29">24-29</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo30-35" checked="checked" />
							<label for="atwo30-35">30-35</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo36-41" checked="checked" />
							<label for="atwo36-41">36-41</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo42-49" checked="checked" />
							<label for="atwo42-49">42-49</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo50-60" checked="checked" />
							<label for="atwo50-60">50-60</label>
						</span>
						<span>
							<input type="checkbox" class="atwo" id="atwo60-100" checked="checked" />
							<label for="atwo60-100">от 60</label>
						</span>
					</div>
					<div class="filterslabel">Город</div>
					<div class="filterscontent">
						<select type="text" id="cityTwo">
							<?php
							echo "<option value='0'>Любой</option>";
							echo "<option value='$oren'>Оренбург</option>";
							foreach($cities as $city)
								echo "<option value='$city[city_id]'>$city[name]</option>";
							echo "<option value='$not_in_ob'>Не в Оренбургской обл.</option>";
							?>
						</select>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<?php require_once ADMIN.DS."footer.php"; ?>
